package com.manong.service;

import com.github.pagehelper.PageInfo;
import com.manong.domain.Order;
import com.manong.domain.Store;
import com.manong.query.OrderQueryObject;
import com.manong.query.StoreQueryObject;
import com.manong.vo.OrderStoreVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

// MenuService.java 接口
public interface IOrderService {

    PageInfo query(OrderQueryObject queryObject);

    void delete(Integer id);

    void saveOrUpdate(OrderStoreVo order);

    @Transactional
    void save(OrderStoreVo order);

    void update(OrderStoreVo order);

    Order get(Integer id);

    void confirmOrder(OrderStoreVo order);

    @Transactional
    void confirmWarehouse(OrderStoreVo order);

    void confirmStore(OrderStoreVo order);

    /**
     * 查询每日订单数量
     * @return
     */
    List<Map<String, Object>> getDailyOrderCount();

    int getTotalOrderCount();

    List<Map<String, Object>> getDailyOrderCountByOriginId(Integer originId);

    List<Map<String, Object>> getOrderStatusCountByOriginId(Integer originId);

    List<Map<String, Object>> getDailyOrderCountByOriginIdAndOrderType(Integer originId);

    List<Map<String, Object>> getOrderStatusCountByOriginIdAndOrderType(Integer originId);
}
